/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package br.siseventos.view.util;

import br.siseventos.model.TbEvento;
import java.util.ArrayList;
import java.util.List;
import org.primefaces.model.DefaultScheduleEvent;
import org.primefaces.model.DefaultScheduleModel;
import org.primefaces.model.ScheduleEvent;

/**
 *
 * @author marcosnatanpacheco
 */
public class ScheduleEventConverter {
    
    public static List<ScheduleEvent> convertToScheduleEvents(List<TbEvento> eventos){
        List<ScheduleEvent> lst = new ArrayList<ScheduleEvent>();
        for(TbEvento e : eventos){
            lst.add(new DefaultScheduleEvent(e.getNmeEvento(), e.getDtaInicioEvento(), e.getDtaTerminoEvento()));
        }
        
        return lst;
    }
}
